package com.own.component.store.core.property;

import com.own.constant.ConstantValue;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;

/**
 * StoreProperty
 *
 * @author chenxueli
 * @date 2023-07-10 16:52:08
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ConfigurationProperties(prefix = StoreProperty.PREFIX)
@SpringBootConfiguration
public class StoreProperty extends LocalStoreProperty {

    public static final String PREFIX = ConstantValue.CONFIG_VALUE_CONTENT + "store";

    /**
     * 是否使用缓存数据
     */
    private boolean enableCacheData = true;

    /**
     * 二次确认框
     */
    private ConfirmProperty confirm = new ConfirmProperty();

    @NestedConfigurationProperty
    private LocalStoreProperty value;

    @NestedConfigurationProperty
    private LocalStoreProperty map;

    @NestedConfigurationProperty
    private LocalStoreProperty set;

    @NestedConfigurationProperty
    private LocalStoreProperty list;

    @NestedConfigurationProperty
    private LocalStoreProperty atomic;

}
